﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;

namespace Kimola.Config
{
  internal class KimolaConfigurationAPIElement : ConfigurationElement
  {
    private static ConfigurationProperty url;
    private static ConfigurationProperty key;
    private static ConfigurationPropertyCollection properties;

    static KimolaConfigurationAPIElement()
    {
      KimolaConfigurationAPIElement.url = new ConfigurationProperty("url", typeof(string), null, ConfigurationPropertyOptions.IsRequired);
      KimolaConfigurationAPIElement.key = new ConfigurationProperty("key", typeof(string), null, ConfigurationPropertyOptions.IsRequired);

      KimolaConfigurationAPIElement.properties = new ConfigurationPropertyCollection();
      KimolaConfigurationAPIElement.properties.Add(KimolaConfigurationAPIElement.url);
      KimolaConfigurationAPIElement.properties.Add(KimolaConfigurationAPIElement.key);
    }

    [ConfigurationProperty("url", IsRequired = true)]
    internal string Url { get { return Convert.ToString(base[url]); } }

    [ConfigurationProperty("key", IsRequired = true)]
    internal string Key { get { return Convert.ToString(base[key]); } }
  }
}